package uebung;

public class Item {

	private int _value;
	private int _weight;

	public int getValue() {
		return _value;
	}
	
	public static Item getRandomItem(){
		return new Item((int) (Math.random() * 10 + 1),
				(int) (Math.random() * 10 + 1));
	}

	public void setValue(int _value) {
		this._value = _value;
	}

	public int getWeight() {
		return _weight;
	}

	public void setWeight(int _weight) {
		this._weight = _weight;
	}

	public Item(int _value, int _weight) {

		this._value = _value;
		this._weight = _weight;
	}

	@Override
	public String toString() {
		return "Item [_value=" + _value + ", _weight=" + _weight + "]";
	}
	

}
